package com.jinlia.show.modules.base.model.po;

import com.jinlia.show.modules.base.system.entity.DeliveryOrder;
import com.jinlia.show.modules.base.system.entity.ErrandDadaCallback;
import com.jinlia.show.modules.base.system.entity.ErrandOrder;
import com.jinlia.show.modules.base.system.entity.Order;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Data
public class ErrandOrderPO extends ErrandOrder {

    /**
     * 配送单
     */
    private DeliveryOrder deliveryOrder;
    /**
     * 配送单
     */
    private Order saleOrder;
    /**
     * 回调信息
     */
    private List<ErrandDadaCallback> errandDadaCallbacks;

    public static ErrandOrderPO fromEntity(ErrandOrder entity) {
        ErrandOrderPO vo = new ErrandOrderPO();
        BeanUtils.copyProperties(entity, vo);
        return vo;
    }
}
